package com.brozha.ans_sys.service;

import com.brozha.ans_sys.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.brozha.ans_sys.utils.Result;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author brozha
 * @since 2021-04-04
 */
public interface UserService extends IService<User> {


    public User getUserFromRedis(String key);
    /**
     * 用户注册
     */
    public Result regist(String username,String userpwd,String nickname,String avatarUrl);

    /**
     * 用户登录
     */
    public Result login(String username,String userpwd);


    public Result getInfo(String token);

    /**
     * 用户退出登录
     * @param token
     * @return
     */
    public Result logOut(String token);

    /**
     * 用户修改
     * @param token
     * @param userpwd
     * @param nickname
     * @param avatarUrl
     * @return
     */
    public Result updateUser(String token,String userpwd,String nickname,String avatarUrl);
}
